g13acf

g13acf © Numerical Algorithms Group, 2002.

Purpose

G13ACF Univariate time series, partial autocorrelations from autocorrelations

Synopsis

[p,v,ar,nvl,ifail] = g13acf(r,nl<,ifail>)

Description

 
 The data consist of values of autocorrelation coefficients 
 r ,r ,...,r , relating to lags 1,2,...,K. These will generally 
  1  2      K                                                  
 (but not necessarily) be sample values such as may be obtained 
 from a time series x  using G13ABF.
                     t             
 
 The partial autocorrelation coefficient at lag l may be 
 identified with the parameter p    in the autoregression
                                l,l        
 
             x =c +p   x   +p   x   +...+p   x   +e 
              t  l  l,1 t-1  l,2 t-2      l,l t-l  l,t
 
 where e    is the predictor error.
        l,t                  
 
 The first subscript l of p    and e    emphasises the fact that 
                           l,l      l,t                         
 the parameters will in general alter as further terms are 
 introduced into the equation (i.e., as l is increased).
 
 The parameters are determined from the autocorrelation 
 coefficients by the Yule-Walker equations
 
          r =p   r   +p   r   +...+p   r   ,  i=1,2,...,l
           i  l,1 i-1  l,2 i-2      l,l i-l
 
 taking r =r    when j<0, and r =1.
         j  |j|                0  
 
 The predictor error variance ratio v =var(e   )/var(x ) is 
                                     l      l,t       t    
 defined by v =1-p   r -p   r -...-p   r .
             l    l,1 1  l,2 2      l,l l
 
 The above sets of equations are solved by a recursive method (the
 Durbin-Levinson algorithm). The recursive cycle applied for 
 l=1,2,...,(L-1), where L is the number of partial autocorrelation
 coefficients required, is initialised by setting p   =r  and 
                                                   1,1  1    
       2
 v =1-r .
  1    1
 
 Then
 
     p       = (r   -p   r -p   r   -...-p   r )/v 
      l+1,l+1    l+1  l,1 l  l,2 l-1      l,l 1   l
 
     p       = p   -p       p       ,  j=1,2,...,l
      l+1,j     l,j  l+1,l+1 l,l+1-j  
 
     v       = v (1-p       )(1+p       ).
      l+1       l    l+1,l+1     l+1,l+1 
 
 If the condition |p   |>=1 occurs, say when l=l , it indicates 
                    l,l                         0              
 that the supplied autocorrelation coefficients do not form a 
 positive-definite sequence, and the recursion is
 not continued. The autoregressive parameters are overwritten at 
 each recursive step, so that upon completion the only available 
 values are p  , for j=1,2,...,L or p       if the recursion has 
             Lj                      l -1,j                     
                                      0                         
 been prematurely halted.
 

Parameters

g13acf

Required Input Arguments:

r (:)                                 real
nl                                    integer

Optional Input Arguments:                       <Default>

ifail                                 integer  -1

Output Arguments:

p (nl)                                real
v (nl)                                real
ar (nl)                               real
nvl                                   integer
ifail                                 integer